package cn.com.sinosoft.ares.insurance.service.struct;

import cn.com.sinosoft.ares.insurance.struct.*;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;
import lombok.extern.slf4j.Slf4j;

import java.util.Arrays;

/**
 * Description:
 * Author: lishangmin
 * Created: 2018-09-13 16:10
 */
@Slf4j
public class Test {

    public static void main(String[] args) {
        Request request = Request.builder()
                .insurePlan(new InsurePlan())
                .application(new Application())
                .insureds(Arrays.asList(new Insured()))
                .contact(new Contact())
                .build();
        Pack pack = Pack.builder().requests(Arrays.asList(request)).build();
        String input = JSON.toJSONString(pack, SerializerFeature.WRITE_MAP_NULL_FEATURES,SerializerFeature.QuoteFieldNames);
        log.info(input);
    }
}
